﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class BattleLevel2 : BattleLevel
{
    public Ship ProtectShip;
    public GameObject ProtectTarget;
    private void Awake()
    {
    }
    protected override void CheckComplete()
    {
        base.CheckComplete();
        if(ProtectShip==null || ProtectTarget==null)
        {
            OnLose();
            return;
        }
        if((ProtectShip.transform.position - ProtectTarget.transform.position).magnitude < 7)
        {
            OnSucceed();
        }
    }
}
